Skip to content

fix(nextjs): Handle __nextGetStaticStore returning undefined#3939

Merged
panteliselef merged 1 commit intomainfrom
elef/user-581-nextjs-get-store-undefined
Aug 13, 2024
Merged

fix(nextjs): Handle __nextGetStaticStore returning undefined#3939
panteliselef merged 1 commit intomainfrom
elef/user-581-nextjs-get-store-undefined

Conversation

@panteliselef
Copy link
Contributor

@panteliselef panteliselef commented Aug 13, 2024

Description

Bug fix: Handle nextGetStore.getStore() returning undefined. Previously a TypeError would occur, when pagePath was accessed.

Fixes: #3772

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@panteliselef panteliselef self-assigned this Aug 13, 2024
@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2024

🦋 Changeset detected

Latest commit: 5a90f37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@panteliselef
Copy link
Contributor Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @panteliselef - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.0.12-snapshot.v5a90f37
@clerk/backend 1.6.3-snapshot.v5a90f37
@clerk/chrome-extension 1.2.1-snapshot.v5a90f37
@clerk/clerk-js 5.14.1-snapshot.v5a90f37
@clerk/elements 0.13.0-snapshot.v5a90f37
@clerk/clerk-expo 2.1.1-snapshot.v5a90f37
@clerk/express 0.0.28-snapshot.v5a90f37
@clerk/fastify 1.0.30-snapshot.v5a90f37
@clerk/localizations 2.5.8-snapshot.v5a90f37
@clerk/nextjs 5.3.1-snapshot.v5a90f37
@clerk/clerk-react 5.4.1-snapshot.v5a90f37
@clerk/remix 4.2.14-snapshot.v5a90f37
@clerk/clerk-sdk-node 5.0.27-snapshot.v5a90f37
@clerk/shared 2.5.1-snapshot.v5a90f37
@clerk/tanstack-start 0.2.1-snapshot.v5a90f37
@clerk/testing 1.2.10-snapshot.v5a90f37
@clerk/themes 2.1.20-snapshot.v5a90f37
@clerk/types 4.13.1-snapshot.v5a90f37
@clerk/ui 0.1.8-snapshot.v5a90f37

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/astro@1.0.12-snapshot.v5a90f37 --save-exact

@clerk/backend

npm i @clerk/backend@1.6.3-snapshot.v5a90f37 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.2.1-snapshot.v5a90f37 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.14.1-snapshot.v5a90f37 --save-exact

@clerk/elements

npm i @clerk/elements@0.13.0-snapshot.v5a90f37 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.1.1-snapshot.v5a90f37 --save-exact

@clerk/express

npm i @clerk/express@0.0.28-snapshot.v5a90f37 --save-exact

@clerk/fastify

npm i @clerk/fastify@1.0.30-snapshot.v5a90f37 --save-exact

@clerk/localizations

npm i @clerk/localizations@2.5.8-snapshot.v5a90f37 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.3.1-snapshot.v5a90f37 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.4.1-snapshot.v5a90f37 --save-exact

@clerk/remix

npm i @clerk/remix@4.2.14-snapshot.v5a90f37 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.27-snapshot.v5a90f37 --save-exact

@clerk/shared

npm i @clerk/shared@2.5.1-snapshot.v5a90f37 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.2.1-snapshot.v5a90f37 --save-exact

@clerk/testing

npm i @clerk/testing@1.2.10-snapshot.v5a90f37 --save-exact

@clerk/themes

npm i @clerk/themes@2.1.20-snapshot.v5a90f37 --save-exact

@clerk/types

npm i @clerk/types@4.13.1-snapshot.v5a90f37 --save-exact

@clerk/ui

npm i @clerk/ui@0.1.8-snapshot.v5a90f37 --save-exact

Copy link
Member

@brkalow brkalow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@panteliselef panteliselef merged commit c443544 into main Aug 13, 2024
@panteliselef panteliselef deleted the elef/user-581-nextjs-get-store-undefined branch August 13, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routing failed. TypeError: Cannot read properties of undefined (reading 'pagePath'

4 participants

Comments